package com.itheima.thread.threadpool.demo01;


public class ThreadPoolDemo01 {

    public static void main(String[] args) {

        ThreadPool threadPool = new ThreadPool();

//        threadPool.submit(new Runnable() {
//            @Override
//            public void run() {
//                System.out.println(Thread.currentThread().getName() + "----执行任务了...." );
//            }
//        });

        for (int i = 0; i < 20; i++) {

            threadPool.submit( () -> System.out.println(Thread.currentThread().getName() + "----执行任务了...." ) );

        }



    }


}
